package abg.core.mapper;

import abg.core.domain.db.MtRoomApply;
import com.mybatisflex.core.query.QueryWrapper;

import static abg.core.domain.db.table.MtRoomApplyTableDef.MT_ROOM_APPLY;

public interface MtRoomApplyMapper extends ZBMapper<MtRoomApply> {


    default MtRoomApply getCloseSettingTime(String userId) {
        QueryWrapper queryWrapper = new QueryWrapper().select("*")
                .and(MT_ROOM_APPLY.USER_ID.eq(userId))
                .orderBy(MT_ROOM_APPLY.ID.desc())
                .limit(1);
        return selectOneByQuery(queryWrapper);
    }
}